//
//  ExpressionNode.h
//  DataCollector
//
//  Created by jiro on 12/06/28.
//  Copyright 2012 jiro music. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "Node.h"

class OperatorNode;
class UnaryOperatorNode;
class BinaryOperatorNode;

class ExpressionNode : public Node
{
public:

	ExpressionNode();

	ExpressionNode( const ExpressionNode& node );

	ExpressionNode( const ExpressionNode& lhs, const BinaryOperatorNode& ope, const ExpressionNode& rhs );

	ExpressionNode( const ExpressionNode& lhs, const UnaryOperatorNode& ope );
	
	ExpressionNode& operator = ( const ExpressionNode& node );
	
	virtual ~ExpressionNode();

	virtual NSString* query() const;
/*
	const ExpressionNode& operator + ( const ExpressionNode& rhs ) const;

	const ExpressionNode& operator - ( const ExpressionNode& rhs ) const;

	const ExpressionNode& operator * ( const ExpressionNode& rhs ) const;

	const ExpressionNode& operator / ( const ExpressionNode& rhs ) const;

	bool operator == ( const ExpressionNode& rhs ) const;

	bool operator != ( const ExpressionNode& rhs ) const;

	bool operator <= ( const ExpressionNode& rhs ) const;

	bool operator < ( const ExpressionNode& rhs ) const;

	bool operator >= ( const ExpressionNode& rhs ) const;

	bool operator > ( const ExpressionNode& rhs ) const;
*/
protected:

	OperatorNode* operatorNode;

	ExpressionNode* rightNode;

	ExpressionNode* leftNode;
};